//
//  ViewController.m
//  GuidePage-OC
//
//  Created by 聚财通 on 16/6/2.
//  Copyright © 2016年 付正. All rights reserved.
//

#import "ViewController.h"
#import "HomeViewController.h"
#import "AppDelegate.h"
#import "AppConfig.h"
#import "SZKNetWorkUtils.h"


#define ScreenWidth self.view.bounds.size.width
#define ScreenHeight self.view.bounds.size.height
// 获取RGB颜色
#define XXColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define XXNewfeatureImageCount 4
#define kRadianToDegrees(radian) (radian* 180.0 )/(M_PI)

@interface ViewController ()
@end

@implementation ViewController

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    
    //初始化浏览器
    [baseWebView.scrollView setContentInset:UIEdgeInsetsMake(0,0,0,0)];
    
    [self setNaviBar];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    
    [baseWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://m.zlc99.com"]]];
    
    //    self.title = @"云富助商城";
    //    UIButton * btn = [[UIButton alloc]initWithFrame:CGRectMake(20, 50, 200, 30)];
    //    btn.backgroundColor = [UIColor redColor];
    ////    btn addTarget:self action:@selector(<#selector#>) forControlEvents:uic
    //
    //
    //    [self.view addSubview:btn];
    
    
    //    HomeViewController * homeVC = [[HomeViewController alloc]init];
    //    [self.navigationController pushViewController:homeVC animated:YES];
    
    
    //    [self setNaviBar];
    
    
    [SZKNetWorkUtils netWorkState:^(NSInteger netState) {
        switch (netState) {
            case 1:{
                NSLog(@"手机流量上网");
                
            }
                break;
            case 2:{
                NSLog(@"WIFI上网");
                
            }
                break;
            default:{
                NSLog(@"没网");
                
            }
                break;
        }
    }];
    
    
}
-(void)setNaviBar{
    
    self.navigationItem.leftBarButtonItems  = NULL;
    self.navigationItem.rightBarButtonItem  = NULL;
    //    [self initTitle];
    
}
#pragma mark - 设置标题文字
-(void)initTitle
{
    NSDictionary *attributes=[NSDictionary dictionaryWithObjectsAndKeys:[UIColor redColor],UITextAttributeTextColor,[UIFont boldSystemFontOfSize:20],UITextAttributeFont, nil];
    [self.navigationController.navigationBar setTitleTextAttributes:attributes];
    self.navigationItem.title =@"百巨云";
    
    //    self.navigationItem.leftBarButtonItem = [UIBarButtonItem createLeftImgBBTframe:CGRectMake(0, 0, 40, self.navigationController.navigationBar.bounds.size.height) imgName:@"index_saomiao" isShowArrow:YES isShowTitle:NO target:self action:@selector(leftbtnAction:)];
    //
    //    self.navigationItem.rightBarButtonItem = [UIBarButtonItem createRightImgBBTframe:CGRectMake(0, 0, 80, self.navigationController.navigationBar.bounds.size.height) imgName:@"index_fangdajing" isShowArrow:YES isShowTitle:NO target:self action:@selector(rightbtnAction:)];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
